added devise to the gemfile. Created user model and devise on top of it. Added authenticate user before filter to the records controller, thus applying it to all actions. Edited routes to route to the login page unless user is logged in.