Fix login duration and auth conditional