clean ups with if/else in login and null errors