Code refactoring
Implemented devise security extension gem
Update to rails, code refactoring