added login and cleaned up warnings