Small bug fix and exit on invalid login