refactoring
working login