added code to redirect if a page is passed in the login form (p_redirect parameter)