add store_location, reset_previous_url and redirect_after_require_login_or methods to application controller
add working redirect to last url add 5.minues.ago.to_i to compair with saved time in session[:last_request_tim]