Add login controller and handle redirects.