Further work on login system