fixed some bugs in controllers and view of sessions and user