login_workflow_spec: implemented:- when on a login page - when login succeeds
Updated Gems to latest version. Verified that there's missing code to register new users
Fixed a login bug. Any user successfully logged in was identified with the first user returned from the database. This happened for two reasons: First the UsersController#index was originally crafted to search for users by their id or email so, any unpermitted parameter being filtered, in the worst case scenario it returns all available users. Second, User resource used to pass user_id as a parameter which is unpermitted. This was further complicated by the fact UsersService did not unwrap the answer returned by the server upon login. The server responded with {id: 'xxx'} and the service kept that information in a cookie without unwrapping the value of id.