Remove Route resource usage and declare separate route for each action. Implement separate POST routes with separate actions for login and for register.