Updated authentication api