Fix undefined current_user bug