Refractored authentication method and added an invalid credential test
Added 2 rspec examples for testing routes