Few refactoring
Work in progress on login