Implement user authentication and provide simple testcase