Added helper method for login