Misc. changes to integrate login