rename username to email and add post database class