Updated the authentication module so it supports customizable redirects to login