made change to set user in session after registeration before redirecting to posts_path