Minor Identity refactor and fix login