Login

Add more error checking to login