Added unit tests for user endpoing