Extracting edit post form into a separate file in preparation of adding edit functionality.
Cleaning up. Fixed a bug where a newly registered user was not being logged in correctly.