login and header tests added + refactoring