finished user authentication and fixed tests'