Added check for user in routes