login properly in test