added account functionallity (this should be moved from controller to libraries/model) and unit tests