store previous url for devise, require login in subject pages