A basic authentication system from scratch with rails