added redirect to last page visited when signing up or signing in