fixed minor login bug

now shows an error message and redirects to login page if wrong info is entered