null pointer exception fix

Fixed a null pointer exception issue when logging in!