Use before_action instead of before_filter.
Fix login redirect path to handle namespaced access.