Login error handling added, #9