Basic authentication and authorization done in Rails 3.2