Fixed bug if login or error was not correct