Logging and error handling
Login now goes throught page not popup.