added login, logout and registration code (UC3.01 and UC3.02)