Added login mechanism that redirect user back to target page from login page