Added login functionality and user repository