Fixed login issue and added support for sorting table views