gem devise rails g devise:install
add mailer in development env, config.action_mailer.default_url_options = { :host => localhost:3000 }
generate devise user model and add nav bar for user login or sign up
add rvmrc and rails g devise:views
one problem, when logout show error, user/log_out routes cant find, its method recognized as get not delete
change path of devise, devise_for :users, path_names: {sign_in: "login", sign_out: "logout"}
change login email to username
add username attr in user model and change default email to username in devise config file
add authentication before some actions