Basic authentication based on railcasts on rails 4