change redirect to dashboard function