Fixed two null pointer exceptions on login tests