Moving login action to the route