Adds flash messages for registration and login redirects.