login view and fixed issue with session