changed index and added login