change check login function for ajax login
change check login function for ajax login 2