BHON-6 Modified register function for redirecting when already logged in