I written all user logic and made connection to database

Also write JUnit for user logic