Improved Login error checks