clean code
fix login null pointer fail