Login and Foreign Key field fixes