Added devise and made some changes