Add post method for creating posts

- move _login method to FlaskTestCase
- add test and method for creating posts