Ok so i have a login function definition before main function where i have used switch statement in MAIN function . What is the right methi of writing code in udf and which part of login code will go under switch -> case 2 ( here i have call login function)