flash error handling for login and facebook login