Splitting login function from run in server
Adding verification of empty user name in Client