login regis logout and main structure should work